package com.xiaoyu.string;

import sun.tools.attach.HotSpotVirtualMachine;

/**
 * Created by xiaoyu on 16/3/30.
 *
 0: aload_0
 1: invokespecial #1                  // Method java/lang/Object."<init>":()V
 4: aload_0
 5: bipush        100
 7: putfield      #2                  // Field myId2:I
 10: aload_0
 11: aconst_null
 12: putfield      #3                  // Field myText2:Ljava/lang/String;
 15: aload_0
 16: bipush        100
 18: putfield      #4                  // Field myId1:I
 21: aload_0
 22: ldc           #5                  // String text1
 24: putfield      #6                  // Field myText1:Ljava/lang/String;
 27: aload_0
 28: new           #7                  // class java/lang/String
 31: dup
 32: ldc           #8                  // String text2
 34: invokespecial #9                  // Method java/lang/String."<init>":(Ljava/lang/String;)V
 37: putfield      #3                  // Field myText2:Ljava/lang/String;
 40: return

 */
public class ClassInitialize {

    //声明类的成员属性
    private int myId1;
    private int myId2  =100;     //对应4，5，7
    private String myText1;
    private String myText2 = null;  //对应10，11，12


    //显示构造函数



    public ClassInitialize() {
        myId1= 100;   //对应15，16，18
        myText1 = "text1";    //对应21，22，24
        myText2 = new String("text2");       //对应27~37
    }
}
